package l1j.server.server.model.npc.action;

import l1j.server.server.datatables.DailyTable;
import l1j.server.server.model.L1Object;
import l1j.server.server.model.Instance.L1PcInstance;
import l1j.server.server.model.npc.L1NpcHtml;

import org.w3c.dom.Element;

public class L1NpcPQuestAction extends L1NpcXmlAction{
	private final int _setpdialyp;
	public L1NpcPQuestAction(Element element) {
		super(element);
		_setpdialyp = Integer.valueOf(element.getAttribute("SetPdaily"));
	}
	
	public L1NpcHtml execute(String actionName, L1PcInstance pc, L1Object obj,
			byte[] args) {
		DailyTable dq = DailyTable.getInstance().loadDaily(pc);
		DailyTable.getInstance().updateDaily(pc.getId(), dq.getMQStep() ,dq.getDailyID(), dq.getDailyStep(), _setpdialyp);
		return null;
	}
}
